package com.iacrqq.sedaf.demo.sHttpServer.event.handler;

import com.iacrqq.sedaf.config.Configuration;
import com.iacrqq.sedaf.event.Event;
import com.iacrqq.sedaf.event.EventDispatcher;
import com.iacrqq.sedaf.event.EventHandler;
import com.iacrqq.sedaf.event.exception.EventHandlerException;

public class ParallelProcessBEventHandler implements EventHandler
{

	@Override
	public void init(Configuration config) throws Exception
	{
		System.out.println("ParallelProcessBEventHandler initialized.");
	}

	@Override
	public void destroy() throws Exception
	{
		System.out.println("ParallelProcessBEventHandler destroied.");
	}

	@Override
	public Event handleEvent(Event event, EventDispatcher eventDispatcher) throws EventHandlerException
	{
		//System.out.println(new StringBuilder("ParallelProcessBEventHandler handle event:").append(event).toString());
		
		return event;
	}

	@Override
	public Event[] handleEvents(Event[] events, EventDispatcher eventDispatcher) throws EventHandlerException
	{
		//System.out.println(new StringBuilder("ParallelProcessBEventHandler handle ").append(events.length).append(" events:").append(events).toString());
		
		return events;
	}

}
